package com.jinlia.show.modules.wxapp.controller;

import com.jinlia.show.modules.base.system.entity.Goods;
import com.jinlia.show.modules.base.system.service.GoodsMapperService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("/manager/goods")
public class ManagerGoodsController {
      @Autowired
    private GoodsMapperService goodsMapperService;

    /**
     * 修改销售模式
     * @param goods
     * @return
     */
    @PostMapping("/saleModel")
    public ResponseEntity<Boolean> updateSaleModel(@RequestBody Goods goods) {
        goodsMapperService.updateSaleModel(goods);
        return ResponseEntity.ok(Boolean.TRUE);
    }
}
